from xtquant import xtconstant
code2order_status={
xtconstant.ORDER_UNREPORTED:"submitting",
xtconstant.ORDER_WAIT_REPORTING:"submitting",
xtconstant.ORDER_REPORTED:"working",
xtconstant.ORDER_REPORTED_CANCEL:"working",
xtconstant.ORDER_PARTSUCC_CANCEL:"working",
xtconstant.ORDER_PART_CANCEL:"working",
xtconstant.ORDER_CANCELED:"canceled",
xtconstant.ORDER_PART_SUCC:"parttraded",
xtconstant.ORDER_SUCCEEDED:"alltraded",
xtconstant.ORDER_JUNK:"rejected",
xtconstant.ORDER_UNKNOWN:"submitting"
}
code2name_order_status={
xtconstant.ORDER_UNREPORTED:"未报",
xtconstant.ORDER_WAIT_REPORTING:"待报",
xtconstant.ORDER_REPORTED:"已报",
xtconstant.ORDER_REPORTED_CANCEL:"已报待撤",
xtconstant.ORDER_PARTSUCC_CANCEL:"部成待撤",
xtconstant.ORDER_PART_CANCEL:"部撤",
xtconstant.ORDER_CANCELED:"已撤",
xtconstant.ORDER_PART_SUCC:"部成",
xtconstant.ORDER_SUCCEEDED:"已成",
xtconstant.ORDER_JUNK:"废单",
xtconstant.ORDER_UNKNOWN:"未知"
}
code2name_order_type={
xtconstant.STOCK_BUY:"买入",
xtconstant.STOCK_SELL:"卖出",
xtconstant.CREDIT_FIN_BUY:"融资买入",
xtconstant.CREDIT_SLO_SELL:"融券卖出",
xtconstant.CREDIT_BUY_SECU_REPAY:"买券还券",
xtconstant.CREDIT_DIRECT_SECU_REPAY:"直接还券",
xtconstant.CREDIT_SELL_SECU_REPAY:"卖券还款",
xtconstant.CREDIT_DIRECT_CASH_REPAY:"直接还款"

}
code2name_price_type={
xtconstant.LATEST_PRICE:"最新价",
xtconstant.FIX_PRICE:"指定价",
xtconstant.MARKET_SH_CONVERT_5_CANCEL:"上交所最优五档即时成交剩余撤销",
xtconstant.MARKET_SH_CONVERT_5_LIMIT:"上交所最优五档即时成交剩转限价",
xtconstant.MARKET_PEER_PRICE_FIRST:"上交所对手方最优价格委托",
xtconstant.MARKET_MINE_PRICE_FIRST:"上交所本方最优价格委托",
xtconstant.MARKET_PEER_PRICE_FIRST:"深交所对手方最优价格委托",
xtconstant.MARKET_MINE_PRICE_FIRST:"深交所本方最优价格委托",
xtconstant.MARKET_SZ_INSTBUSI_RESTCANCEL:"深交所即时成交剩余撤销委托",
xtconstant.MARKET_SZ_CONVERT_5_CANCEL:"深交所最优五档即时成交剩余撤销",
xtconstant.MARKET_SZ_FULL_OR_CANCEL:"深交所全额成交或撤销委托"
}
# code2name_oprice_type={
# xtconstant.BROKER_PRICE_LATEST:"最新价",#48:"",#最新价
#     xtconstant.BROKER_PRICE_ANY:"市价",#49:"",#市价
#     xtconstant.BROKER_PRICE_LIMIT:"限价",#50:"",#限价
#     xtconstant.BROKER_PRICE_BEST:"最优价",#51:"",#最优价
#     xtconstant.BROKER_PRICE_PROP_ALLOTMENT:"配股",#52:"",#配股
#     xtconstant.BROKER_PRICE_PROP_REFER:"转托",#53:"",#转托
#     xtconstant.BROKER_PRICE_PROP_SUBSCRIBE:"申购",#54:"",#申购
#     xtconstant.BROKER_PRICE_PROP_BUYBACK:"回购",#55:"",#回购
#     xtconstant.BROKER_PRICE_PROP_PLACING:"配售",#56:"",#配售
#     xtconstant.BROKER_PRICE_PROP_DECIDE:"指定",#57:"",#指定
#     xtconstant.BROKER_PRICE_PROP_EQUITY:"转股",#58:"",#转股
#     xtconstant.BROKER_PRICE_PROP_SELLBACK:"回售",#59:"",#回售
#     xtconstant.BROKER_PRICE_PROP_DIVIDEND:"股息",#60:"",#股息
#     xtconstant.BROKER_PRICE_PROP_SHENZHEN_PLACING:"深圳配售确认",#68:"",#深圳配售确认
#     xtconstant.BROKER_PRICE_PROP_CANCEL_PLACING:"配售放弃",#69:"",#配售放弃
#     xtconstant.BROKER_PRICE_PROP_WDZY:"无冻质押",#70:"",#无冻质押
#     xtconstant.BROKER_PRICE_PROP_DJZY:"冻结质押",#71:"",#冻结质押
#     xtconstant.BROKER_PRICE_PROP_WDJY:"无冻解押",#72:"",#无冻解押
#     xtconstant.BROKER_PRICE_PROP_JDJY:"解冻解押",#73:"",#解冻解押
#     xtconstant.BROKER_PRICE_PROP_ETF:"ETF申购",#81:"",#ETF申购
#     xtconstant.BROKER_PRICE_PROP_VOTE:"投票",#75:"",#投票
#     xtconstant.BROKER_PRICE_PROP_YYSGYS:"要约收购预售",#92:"",#要约收购预售
#     xtconstant.BROKER_PRICE_PROP_YSYYJC:"预售要约解除",#77:"",#预售要约解除
#     xtconstant.BROKER_PRICE_PROP_FUND_DEVIDEND:"基金设红",#78:"",#基金设红
#     xtconstant.BROKER_PRICE_PROP_FUND_ENTRUST:"基金申赎",#79:"",#基金申赎
#     xtconstant.BROKER_PRICE_PROP_CROSS_MARKET:"跨市转托",#80:"",#跨市转托
#     xtconstant.BROKER_PRICE_PROP_EXERCIS:"权证行权",#83:"",#权证行权
#     xtconstant.BROKER_PRICE_PROP_PEER_PRICE_FIRST:"对手方最优价格",#84:"",#对手方最优价格
#     xtconstant.BROKER_PRICE_PROP_L5_FIRST_LIMITPX:"最优五档即时成交剩余转限价",#85:"",#最优五档即时成交剩余转限价
#     xtconstant.BROKER_PRICE_PROP_MIME_PRICE_FIRST:"本方最优价格",#86:"",#本方最优价格
#     xtconstant.BROKER_PRICE_PROP_INSTBUSI_RESTCANCEL:"即时成交剩余撤销",#87:"",#即时成交剩余撤销
#     xtconstant.BROKER_PRICE_PROP_L5_FIRST_CANCEL:"最优五档即时成交剩余撤销",#88:"",#最优五档即时成交剩余撤销
#     xtconstant.BROKER_PRICE_PROP_FULL_REAL_CANCEL:"全额成交并撤单",#89:"",#全额成交并撤单
#     xtconstant.BROKER_PRICE_PROP_DIRECT_SECU_REPAY:"直接还券",#101:"",#直接还券
#     xtconstant.BROKER_PRICE_PROP_FUND_CHAIHE:"基金拆合",#90:"",#基金拆合
#     xtconstant.BROKER_PRICE_PROP_DEBT_CONVERSION:"债转股",#91:"",#债转股
#     xtconstant.BROKER_PRICE_BID_LIMIT:"港股通竞价限价",#92:"",#港股通竞价限价
#     xtconstant.BROKER_PRICE_ENHANCED_LIMIT:"港股通增强限价",#93:"",#港股通增强限价
#     xtconstant.BROKER_PRICE_RETAIL_LIMIT:"港股通零股限价",#94:"",#港股通零股限价
#     xtconstant.BROKER_PRICE_PROP_INCREASE_SHARE:"增发",#'j':"",#增发
#     xtconstant.BROKER_PRICE_PROP_COLLATERAL_TRANSFER:"担保品划转",#107:"",#担保品划转
#     xtconstant.BROKER_PRICE_PROP_NEEQ_PRICING:"定价",#'w':"",#定价（全国股转 - 挂牌公司交易 - 协议转让）
#     xtconstant.BROKER_PRICE_PROP_NEEQ_MATCH_CONFIRM:"成交确认",#'x':"",#成交确认（全国股转 - 挂牌公司交易 - 协议转让）
#     xtconstant.BROKER_PRICE_PROP_NEEQ_MUTUAL_MATCH_CONFIRM:"互报成交确认",#'y':"",#互报成交确认（全国股转 - 挂牌公司交易 - 协议转让）
#     xtconstant.BROKER_PRICE_PROP_NEEQ_LIMIT:"限价"#'z':"",#限价（用于挂牌公司交易 - 做市转让 - 限价买卖和两网及退市交易-限价买卖）
# }